package com.example.carbon.dao;

import com.example.carbon.pojo.vo.MaterialProduceVo;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;


@Mapper
public interface MaterialProductDao {

    boolean insertNewInfo(String modelId, String materialId);

    boolean deleteRelInfoByModelId(String modelId);

    boolean deleteRelInfoByMaterialId(String materialId);

    /**
     * 如果物料档案的值改变了，那么就更新值
     * @param modelId
     * @param materialOldId
     * @param materialNewId
     * @return
     */
    boolean updateRelInfoByMaterialId(String modelId, String materialOldId,String materialNewId);

    List<MaterialProduceVo> selectByModelId(String modelId);
}
